Skip to content

TST: catch exception for div/truediv operations between Timedelta and pd.NA #58188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

droussea2001
Copy link
Contributor

@droussea2001 droussea2001 commented Apr 8, 2024

This PR add a test to catch TypeError raised by div and true div operations between Timedelta and pd.NA.

@droussea2001 droussea2001 changed the title Test 54315 catch exception for div/truediv operations between Timedelta and pd.NA TST: 54315 catch exception for div/truediv operations between Timedelta and pd.NA Apr 8, 2024
@droussea2001 droussea2001 changed the title TST: 54315 catch exception for div/truediv operations between Timedelta and pd.NA TST: catch exception for div/truediv operations between Timedelta and pd.NA Apr 8, 2024
@@ -362,6 +362,7 @@ Datetimelike
Timedelta
^^^^^^^^^
- Accuracy improvement in :meth:`Timedelta.to_pytimedelta` to round microseconds consistently for large nanosecond based Timedelta (:issue:`57841`)
- Add a test for div and true div between ``Timedelta`` and ``pd.NA`` raising a TypeError (:issue:`54315`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whatsnew notes are not needed for just unit test additions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I just removed it

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Apr 8, 2024
@mroeschke mroeschke added this to the 3.0 milestone Apr 15, 2024
@mroeschke mroeschke merged commit 9c14725 into pandas-dev:main Apr 15, 2024
46 checks passed
@mroeschke
Copy link
Member

Thanks @droussea2001

@droussea2001
Copy link
Contributor Author

You're welcome !

@droussea2001 droussea2001 deleted the test/T-54315-div-truediv-pyarrow-duration branch April 30, 2024 18:39
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
… pd.NA (pandas-dev#58188)

* *TST 54315 Add tests for pd.Timedelta and pd.NA div / truediv

* Add release doc for TST 54315

* Apply pre commit correction for TST 54315

* "Correct bug fix description removed"

* Remove unnecessary unit test description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TST: div/truediv with PyArrow duration types
2 participants